Xbasic

touch Function

Syntax

dim result as L = touch(C filename)

Arguments

filenameCharacter

The file to update the last access and last update time.

Returns

resultLogical

Returns .t. if operation succeeds. Returns .f. if the operation fails to update the file, either because the file is locked for use by another process or because the file doesn't exist.

Description

Updates the last access and last update time for a file.

Example

dim file as C = "C:/path/to/file.txt"
if (touch(file)) then
    ' success
end if